#pragma once
#include "glew.h"
#include <map>
#include <stack>
#include <string>

class FBO
{
public:
	FBO();

	//hdr/normal color
	void AttachColorBuffer(const char * bufferName, GLenum attachment, GLenum dataType, int width, int height);

	void AttachDepthBuffer(const char * bufferName, int width, int height);

	GLuint GetBuffer(const char * bufferName);

	//complete fbo setting
	void Finish();

	void Bind();

	void Unbind();

	std::map<std::string, GLuint> mBuffers;
	std::stack<GLenum> mDrawBuffers;
	GLuint mFbo;
};
